home *** CD-ROM | disk | FTP | other *** search
/ How Many Bugs in a Box / How Many Bugs in a Box.cdr / bugs / act3 / 00272_keydwn.ls < prev    next >
Encoding:
Text File  |  1995-03-28  |  2.0 KB  |  80 lines

  1. on clearcounter
  2.   global isaid
  3.   set isaid to 1
  4.   repeat with xxx = 5 to 34
  5.     set the foreColor of sprite xxx to 255
  6.     set the ink of sprite xxx to 36
  7.   end repeat
  8.   updateStage()
  9. end
  10.  
  11. on hibugcount
  12.   global isaid, WhichBug, buglist
  13.   repeat while the mouseDown
  14.     set myv to the mouseV
  15.     set myh to the mouseH
  16.     if myv > 345 then
  17.       set myv to 345
  18.     end if
  19.     if myh < 15 then
  20.       set myh to 15
  21.     end if
  22.     if myh > 625 then
  23.       set myh to 625
  24.     end if
  25.     set the locH of sprite the clickOn to myh
  26.     set the locV of sprite the clickOn to myv
  27.     updateStage()
  28.   end repeat
  29.   if the ink of sprite the clickOn = 4 then
  30.     exit
  31.   end if
  32.   set igotit to the name of cast the castNum of sprite the clickOn
  33.   set okbug to getAt(buglist, WhichBug)
  34.   if char 5 of igotit = "0" then
  35.     set igotit to 10
  36.   else
  37.     set igotit to value(char 4 of igotit)
  38.   end if
  39.   if okbug = igotit then
  40.     set stink to the timer + 15 + (the size of cast ("num" & isaid) / 183)
  41.     set the ink of sprite the clickOn to 4
  42.     puppetSound("num" & isaid)
  43.     repeat while the timer < stink
  44.       updateStage()
  45.     end repeat
  46.     set isaid to isaid + 1
  47.   end if
  48. end
  49.  
  50. on hibugall
  51.   global buglist, WhichBug
  52.   updateStage()
  53.   set tempcount to 1
  54.   repeat with xxx = 5 to 34
  55.     set the ink of sprite xxx to 36
  56.   end repeat
  57.   updateStage()
  58.   repeat with xxx = 5 to 34
  59.     set igotit to the name of cast the castNum of sprite xxx
  60.     if the number of chars in string(igotit) > 3 then
  61.       if char 5 of igotit = "0" then
  62.         set igotit to 10
  63.       else
  64.         set igotit to value(char 4 of igotit)
  65.       end if
  66.       if igotit = getAt(buglist, WhichBug) then
  67.         set stink to the timer + 15 + (the size of cast ("num" & tempcount) / 183)
  68.         set the blend of sprite xxx to 100
  69.         set the ink of sprite xxx to 4
  70.         puppetSound("num" & tempcount)
  71.         repeat while the timer < stink
  72.           updateStage()
  73.         end repeat
  74.         set tempcount to tempcount + 1
  75.         set the ink of sprite xxx to 36
  76.       end if
  77.     end if
  78.   end repeat
  79. end
  80.